﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true"
	CodeBehind="ActivityList.aspx.cs" Inherits="SBACN.WebSite.Admin.ActivityList" %>

<%@ Import Namespace="SBACN.WebSite.Common" %>
<%@ Register Src="../UC/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
	<script type="text/javascript">
		function DeleteListNews(id) {
			if (confirm("确认要删除吗？")) {
				document.getElementById("<%= hid_ID.ClientID%>").value = id;
				document.getElementById("<%= btn_Delete.ClientID%>").click();
			}
		}

		function RefreshNewsList() {
			if (document.getElementById("<%= btn_NewsRefresh.ClientID%>")) {
				document.getElementById("<%= btn_NewsRefresh.ClientID%>").click();
			}
		}
	</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table-stroke2">
		<tr>
			<td class="form-title2" width="40%">
				活动标题
			</td>
			<td class="form-title2" width="10%">
				活动时间
			</td>

			<td class="form-title2" width="10%">
				发布人
			</td>
			<td class="form-title2" width="8%">
				发布时间
			</td>
			<td class="form-title2" width="15%">
				操作
			</td>
		</tr>
		<asp:Repeater ID="rpt_News" runat="server">
			<ItemTemplate>
				<tr style="height: 15px">
					<td class="form-body">
						<%# Eval("Title").ToString().CutTo(36,34)%>
					</td>
					<td class="form-body">
						<%# Convert.ToDateTime(Eval("ActivitiesDate")).ToString("yyyy-MM-dd")%>
					</td>
					<td class="form-body">
						<%# Eval("CreateBy")%>
					</td>
					<td class="form-body">
						<%# Convert.ToDateTime(Eval("CreateDate")).ToString("yyyy-MM-dd")%>
					</td>
					<td class="form-body">
						<a href="ActivityEdit.aspx?id=<%# Eval("ID")%>&st=<%= SystemType + (IsEN ? "&en=1" : "") + (ExEdit ? "&ex=1" : "")%>"
							target="_blank">编辑活动</a>&nbsp;&nbsp;<a href="ActivityMediaList.aspx?id=<%# Eval("ID")%>&st=<%= SystemType + (IsEN ? "&en=1" : "") + (ExEdit ? "&ex=1" : "")%>"
								target="_blank">编辑报道</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="return DeleteListNews('<%# Eval("ID")%>');">
									删除</a>
					</td>
				</tr>
			</ItemTemplate>
			<AlternatingItemTemplate>
				<tr style="background-color: #ccc">
					<td class="form-label">
						<%# Eval("Title").ToString().CutTo(36, 34)%>
					</td>
					<td class="form-label">
						<%# Convert.ToDateTime(Eval("ActivitiesDate")).ToString("yyyy-MM-dd")%>
					</td>
					<td class="form-label">
						<%# Eval("CreateBy")%>
					</td>
					<td class="form-label">
						<%# Convert.ToDateTime(Eval("CreateDate")).ToString("yyyy-MM-dd")%>
					</td>
					<td class="form-label">
						<a href="ActivityEdit.aspx?id=<%# Eval("ID")%>&st=<%= SystemType + (IsEN ? "&en=1" : "") + (ExEdit ? "&ex=1" : "")%>"
							target="_blank">编辑活动</a>&nbsp;&nbsp;<a href="ActivityMediaList.aspx?id=<%# Eval("ID")%>&st=<%= SystemType + (IsEN ? "&en=1" : "") + (ExEdit ? "&ex=1" : "")%>"
								target="_blank">编辑报道</a>&nbsp;&nbsp;<a href="javascript:void(0);" onclick="return DeleteListNews('<%# Eval("ID")%>');">
									删除</a>
					</td>
				</tr>
			</AlternatingItemTemplate>
		</asp:Repeater>
		<tr>
			<td colspan="7" class="form-body">
				<a href="ActivityEdit.aspx?ad=1&st=<%= SystemType%><%= ExEdit ? "&ex=1" : ""%><%= IsEN ? "&en=1" : ""%>"
					target="_blank">添加活动</a>
			</td>
		</tr>
		<tr>
			<td colspan="7" class="form-body">
				<uc1:Pager ID="Pager1" runat="server" OnSelectedPageIndexChanged="BindSelectedPageIndexChanged"
					PageSize="15" />
			</td>
		</tr>
	</table>
	<div style="display: none;">
		<asp:HiddenField ID="hid_ID" Value="" runat="server" />
		<asp:Button Text="删除" ID="btn_Delete" runat="server" OnClick="btn_Delete_Click" />
		<asp:Button Text="刷新" ID="btn_NewsRefresh" runat="server" OnClick="btn_NewsRefresh_Click" />
	</div>
</asp:Content>
